package com.jsyl.lwbk.business.mapper;

import com.jsyl.lwbk.business.domain.CourseChildScore;
import com.jsyl.lwbk.business.dto.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CourseChildScoreMapper {

    List<CourseChildScoreDTO> findListByCourse(@Param("childCourseId") Long childCourseId);

    CourseChildScore selectOne(@Param("childCourseId") Long childCourseId,
                               @Param("childId") Long childId);

    CourseChildScore selectScore(@Param("childCourseId") Long childCourseId,
                               @Param("childId") Long childId,
                               @Param("projectCode")String projectCode);

    List<CourseChildScore> selectList(@Param("childCourseId") Long childCourseId);

    CourseChildScore getLastScore(@Param("childCourseId") Long childCourseId,
                                               @Param("childId") Long childId,
                                               @Param("projectCode")String projectCode);

    List<CourseChildScore> listScoreByCode(@Param("childId") Long childId,
                                      @Param("projectCode")String projectCode);

    int update(CourseChildScore courseChildScore);

    int insert(CourseChildScore courseChildScore);

    BasicExpressionDTO getBasicExpression(@Param("childCourseId") Long childCourseId, @Param("childId") Long childId);

    List<BasicExpressionDTO> listBasicExpression(@Param("childCourseId") Long childCourseId,@Param("childId") Long childId);

    /**
     *  统计学生实际上课次数
     * @param childCourseId
     * @param childId
     * @return
     */
    Integer countClassTimes(@Param("childCourseId") Long childCourseId,@Param("childId") Long childId);


    List<ChildScoreDTO> listAllChild(@Param("teacherName")String teacherName,
                                     @Param("childName")String childName,
                                     @Param("phone")String phone,
                                     @Param("teacherId")Long teacherId,
                                     @Param("centerId")Long centerId);


    List<ChildScoreDetailDTO> childScoreDetailList(@Param("childId")Long childId,
                                                   @Param("teacherName")String teacherName,
                                                   @Param("startDate")String startDate,
                                                   @Param("endDate")String endDate);


    List<HistoryScoreDTO> listHistoryScore(@Param("childId")Long childId, @Param("projectCode")String projectCode);

    List<ReadingComprehensionScoreDTO> listChildScore(@Param("childCourseId")Long childCourseId);


}
